#include<iostream>
#include<string>
#include<memory>
#include<sstream>

//事件 -- 租房
class RentHouse
{
    public:
    virtual void rent() = 0;
};

//被代理对象 -- 房东
class LandLord : public RentHouse
{
    public:
    virtual void rent()
    {
        std::cout<<"把房子出租"<<std::endl;
    }
};

//代理人 -- 中介
class Agency : public LandLord
{
    public:
    virtual void rent()
    {
        std::cout<<"发布招租\n";
        std::cout<<"看房\n";
        _landlord.rent();
        std::cout<<"后期维修\n";
    }
    private:
    LandLord _landlord;
};

int main()
{
    // Agency agent;
    // agent.rent();
    std::stringstream ss;
    ss<<"hello world\n";
    std::cout<<ss.str()<<std::endl;
    return 0;
}